$(function(){

var provinces=[{id:"0",name:"安徽"},
                {id:"1",name:"江苏"},
]
var cities=[
                [{id:"0",name:"合肥",level:1},{id:"1",name:"六安",level:1},],

                [{id:"2",name:"无锡",level:1},{id:"3",name:"南京",level:1}]
              
            ]

var qu=[
                [{id:0,name:"蜀山"},{id:1,name:"瑶海"}],
                [{id:2,name:"金安"},{id:3,name:"裕安区"}],
                [{id:4,name:"梁溪"},{id:5,name:"惠山"}],
                [{id:6,name:"鼓楼区"},{id:7,name:"玄武区"}]



]

$(provinces).each(function(index,province){
    $('#shen').append('<option value='+province.id+'>'+province.name+'</option>');
})

$('#shen').change(function(){
  let provincesId=Number($(this).val());
 $('#shi').empty();
   $('#shi').append('<option >'+"输入市"+'</option>');
  $(cities[provincesId]).each(function(index,city){
    $('#shi').append('<option value='+city.id+'>'+city.name+'</option>');
    
})  
})

$('#shi').change(function(){
    $('#qu').empty();
    $('#qu').append('<option >'+"输入区"+'</option>');
    $(qu[$(this).val()]).each(function(index,qu){
        $('#qu').append('<option value='+qu.id+'>'+qu.name+'</option>');
       
    })  








})

})